package com.devops.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.devops.admin.model.DOSResourceProjectRelation;

import java.util.List;

/**
 * @ClassName DOSResourceProjectRelationService
 * @Description TODO
 * @Author hepingguo
 * @Date 2022/6/8 11:25
 **/
public interface DOSResourceProjectRelationService extends IService<DOSResourceProjectRelation> {

    /**
     * @Author heyabo
     * @Description 绑定资源和项目
     * @Date 09:16 2022/6/9
     * @Param [resourceId, projectIds]
     * @return java.lang.Boolean
     **/
    Boolean bindRelation(Integer resourceId, List<Integer> projectIds);

    /**
     * @Author heyabo
     * @Description 解绑资源和项目
     * @Date 09:52 2022/6/9
     * @Param [resourceId, projectId]
     * @return boolean
     **/
    boolean noBindRelation(Integer resourceId, Integer projectId);

    /**
     * @Author heyabo
     * @Description 绑定资源和项目
     * @Date 09:16 2022/6/9
     * @Param [resourceId, projectIds]
     * @return java.lang.Boolean
     **/
    boolean bindRelations(Integer resourceId, List<Integer> projectIds);

    /**
     * @Author heyabo
     * @Description 解绑资源和项目
     * @Date 17:47 2022/6/9
     * @Param [resourceId, projectIds]
     * @return boolean
     **/
    boolean noBindRelations(Integer resourceId, List<Integer> projectIds);

    /**
     * @Author heyabo
     * @Description 普通用户绑定项目和资源
     * @Date 13:56 2022/6/13
     * @Param [resourceId, projectId]
     * @return boolean
     **/
    boolean bindResourceProject(List<Integer> resourceIds, Integer projectId, Integer type);
}
